home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / networking / pgpuam / sources / tpgpuamprefs.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.0 KB  |  80 lines

  1. //    TPGPUAMPrefs.h - Preference Object  
  2. // 
  3. // Apple Macintosh Developer Technical Support
  4. // Written by:  Vinnie Moscaritolo
  5. //
  6. //  Copyright (work in progress)  Apple Computer, Inc All rights reserved.
  7. //
  8. // You may incorporate this sample code into your applications without
  9. // restriction, though the sample code has been provided "AS IS" and the
  10. // responsibility for its operation is 100% yours.  However, what you are
  11. // not permitted to do is to redistribute the source as "DSC Sample Code"
  12. // after having made changes. If you're going to re-distribute the source,
  13. // we require that you make it clear in the source that the code was
  14. // descended from Apple Sample Code, but that you've made changes.
  15. // 
  16.  
  17. #pragma once
  18.  
  19. #include <TPrefs.h>
  20.   
  21. // ---------------------------------------------------------------------------
  22. //     TPGPUAMPrefs - Preference Object  
  23. // 
  24. // ---------------------------------------------------------------------------
  25. // 
  26. class TPGPUAMPrefs  : public TPrefs
  27. {
  28. public:
  29.     
  30.   TPGPUAMPrefs() : TPrefs() , 
  31.                       fDirty(false),
  32.                       fDisclosureState(false),
  33.                       fCachePassPhrase(false),
  34.                       fAuthenticateServer(true),
  35.                       fOption1(false),
  36.                       fOption2(false)
  37.                       {};
  38.           
  39.     virtual void     Initialize();             
  40.     virtual void     Finalize();        
  41.       
  42.  
  43.     Boolean GetDisclosureState();
  44.     void     SetDisclosureState(Boolean);
  45.  
  46.     Boolean GetCachePassPhrase();
  47.     void     SetCachePassPhrase(Boolean);
  48.     
  49.     SInt16     GetCachePassPhraseTimeLimit();
  50.     void     SetCachePassPhraseTimeLimit(SInt16);
  51.  
  52.     Boolean GetAuthenticateServer();
  53.     void     SetAuthenticateServer(Boolean);
  54.  
  55.     Boolean GetOption1();
  56.     void     SetOption1(Boolean);
  57.  
  58.     Boolean GetOption2();
  59.     void     SetOption2(Boolean);
  60.     
  61.  
  62. protected:  
  63.     virtual OSErr     GetPrefSpec(FSSpec *fss );
  64.     virtual OSErr    CreatePrefFile(FSSpec *fss);        
  65.  
  66.  
  67. // PRIVATE FIELDS
  68. protected:
  69.     Boolean fDisclosureState;
  70.     Boolean fCachePassPhrase;
  71.     SInt16  fCachePassPhraseTimeLimit;
  72.      Boolean    fAuthenticateServer;        /* require server Authentication */         
  73.     Boolean    fOption1;                 
  74.     Boolean    fOption2;         
  75.     
  76.     
  77.     Boolean    fDirty;
  78.   };
  79.  
  80.